<?xml version="1.0" encoding="UTF-8"?>
<!-- Copyright 2008 XBRL International. All Rights Reserved. -->
<?xml-stylesheet type="text/xsl" href="../stylesheets/functionDefinition.xsl"?>
<function
  xmlns="http://xbrl.org/2008/function" 
  xmlns:reg="http://xbrl.org/2008/registry" 
  xmlns:xhtml="http://www.w3.org/1999/xhtml" 
  xmlns:xfi="http://www.xbrl.org/2008/function/instance" 
  xmlns:xfie="http://www.xbrl.org/2008/function/instance/error" 
  xmlns:xbrli="http://www.xbrl.org/2003/instance" 
  xmlns:xbrldi="http://xbrl.org/2006/xbrldi"
  xmlns:xlink="http://www.w3.org/1999/xlink" 
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
  xsi:schemaLocation="
  http://xbrl.org/2008/registry ../schemas/registry.xsd
  http://xbrl.org/2008/function ../schemas/function.xsd
  ">

  <lastUpdated moment="2008-02-27T00:00:00" />

  <owners>
    <reg:owner id="geoff">
       <reg:name>Geoff Shuetrim</reg:name>
       <reg:affiliation>Galexy</reg:affiliation>
       <reg:email>geoff@galexy.net</reg:email>
       <reg:assumedOwnership moment="2008-02-05T00:00:00" />
    </reg:owner>
    <reg:owner id="herm">
       <reg:name>Herm Fischer</reg:name>
       <reg:affiliation>UBMatrix / Mark V Systems</reg:affiliation>
       <reg:email>fischer@markv.com</reg:email>
       <reg:assumedOwnership moment="2008-09-01T00:00:00" />
    </reg:owner>
  </owners>

  <summary>
    Returns the child element of the segment or scenario that contains the typed dimension value
    if there is a value for the dimension in either the segment or scenario of the item and returns the
    empty sequence otherwise.
  </summary>

  <documentation>
  </documentation>

  <signature name="xfi:fact-typed-dimension-value">

    <input name="item" type="schema-element(xbrli:item)">
      <xhtml:p>
        The item that the dimension value is required for.
      </xhtml:p>
    </input>

    <input name="dimension" type="xs:QName">
      <xhtml:p>
        The QName of the dimension that the value is required for.
      </xhtml:p>
    </input>

    <output type="element(xbrldi:typedMember)?">
      <xhtml:p>
        Returns the child element of the segment or scenario that contains the typed dimension value
        if there is a value for the dimension in either the segment or scenario of the item and returns the
        empty sequence otherwise.
        The data type of the child and its descendant elements have the appropriate type 
        based on the Post Schema Validation Infoset.
      </xhtml:p>
    </output>
  </signature>

  <error code="xfie:invalidTypedDimensionQName">
    <xhtml:p>
      This error MUST be thrown the dimension does not specify an 
      typed dimension in the reference discoverable taxonomy set.
    </xhtml:p>
  </error>

  <conformanceTest xlink:type="simple" xlink:href="90310 xfi.fact-typed-dimension-value testcase.xml"/>

  <revisions>
    <reg:revision on="2008-02-27T10:54:00" by="geoff">
      <xhtml:p>
        Created the function definition.
      </xhtml:p>
    </reg:revision>
    <reg:revision on="2008-09-01T00:00:00" by="herm">
      <xhtml:p>
        Made the function segment/scenario agnostic, renamed without segment/scenario in name.
      </xhtml:p>
    </reg:revision>
    <reg:revision on="2008-11-13T00:00:00" by="geoff">
      <xhtml:p>
        Removed the xfie:invalidDimensionForFact error code because any such problems are expected to be detected
        by pre-processing validation of the instance containing the fact.
      </xhtml:p>
    </reg:revision>
    <reg:revision on="2008-12-05T00:00:00" by="herm">
      <xhtml:p>
        Added data type sentence.
      </xhtml:p>
    </reg:revision>
  </revisions>

</function>
